package vip.liux.backend.application.service.point;


import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;

/**
 * 退款积分请求数据传输对象
 */
@Getter
@Setter
public class PointsRefundDto {
    @NotBlank(message = "原交易流水号不能为空")
    private String originalTransactionNo; // 原交易流水号

    @NotNull(message = "退款积分不能为空")
    @DecimalMin(value = "0.01", message = "退款积分必须大于0")
    private BigDecimal points; // 退款积分数量

    @NotBlank(message = "订单编号不能为空")
    private String orderNo; // 订单编号

    private String description; // 描述信息

    public PointsRefundDto(String originalTransactionNo, BigDecimal points, String orderNo, String description) {
        this.originalTransactionNo = originalTransactionNo;
        this.points = points;
        this.orderNo = orderNo;
        this.description = description;
    }
}